﻿using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;

namespace EFCoreOptimisticCore;

public class HouseConfig : IEntityTypeConfiguration<House>
{
    public void Configure(EntityTypeBuilder<House> builder)
    {
        builder.ToTable("T_House").ToTable(p => p.HasComment("房产信息表")).HasKey(p=>p.Id);
        // builder.Property(p=>p.Owner).IsConcurrencyToken();
        builder.Property(p => p.RowVersion).IsRowVersion();
    }
}
